{template 'admin','header'}
<body>
<form action="admin/menu.php?action=listorder" name="form1"  method="POST" onsubmit="return r_submit(this);">
    <table cellspacing="1" cellpadding="0" align="center" class="table_list">
        <caption>菜单管理</caption>
        <tbody>
            <tr class="">
                <th width="80" class="align_c"><input type="checkbox" onclick="checkall(this,'mid')" id="chkall">全选/取消</th>
                <th width="5%">排序</th>
                <th>名称</th>
                <th width="5%">类型</th>
                <th width="30%">管理操作</th>
            </tr>
            {loop $menu_list $r}
            <tr class="">
                <td class="align_c">
                    <input id="mid" name="mid[]" type="checkbox" id="checkbox"  value="{$r['id']}"/>
                </td>
                <td class="align_c">
                    <input type="text" name="listorder[{$r['id']}]" size="2" value="{$r['listorder']}"/>
                </td>
                <td><a href="admin/menu.php?parentid={$r['id']}">{$r['name']}</a></td>
                <td class="align_c">
                    {if $r['isfolder']==1}
                        目录
                    {else}
                        链接
                    {/if}
                </td>
                <td class="align_c">
                    {if check_perms('menu002')===true}<a href="{$self_dir}/menu.php?action=add&menuid={$r['id']}&forward={$forward}">添加子菜单</a>&nbsp;|&nbsp;{/if}
                    {if check_perms('menu001')===true}<a href="{$self_dir}/menu.php?action=child&menuid={$r['id']}&forward={$forward}">子菜单</a>&nbsp;|&nbsp;{/if}
                    {if check_perms('menu003')===true}<a href="{$self_dir}/menu.php?action=edit&menuid={$r['id']}&forward={$forward}">修改</a>&nbsp;|&nbsp;{/if}
                    {if check_perms('menu004')===true}<a href="javascript:my_request('{format_url("$self_dir/menu.php?action=del&menuid=".$r['id'])}','确认要删除吗？')">删除</a>{/if}
                </td>
            </tr>
            {/loop}
        </tbody>
    </table>
     <div class="button_box">
        {if check_perms('menu005')===true}<input class="button_style" name="order" type="button" value=" 排序 " onclick="change_opt('form1','{$self_dir}/menu.php?action=listorder')"/>{/if}
        {if check_perms('menu002')===true}<input class="button_style" name="add" type="button" value=" 添加菜单 " onclick="self.location='{$self_url}?action=add&menuid={$menuid}&forward={$forward}'"/>{/if}
        {if isset($child)=='child'}<input class="button_style" name="del" type="button" value=" 返回 "  onclick="self.location='{urldecode($parent_forward)}'"/>{/if}
    </div>
</form>
<div id="pages">
    {$menu_pages}
</div>
{template 'admin','footer'}
